package com.lz.proxy2;

/**
 * @ClassName Text
 * @Description 测试类
 * @Author 2214361854
 * @Date 2022/3/21 16:12
 * @Version 1.0
 */
public class Text {
    public static void main(String[] args) {
        //真实角色
        House host = new HouseImpl();

        //代理角色，传入代理
        Proxy2 pr2 = new Proxy2(host);

        //代理执行
        House proxy2 = (House)pr2.getProxy2();
        proxy2.rent();

    }
}
